<?php
	require_once($_SERVER['DOCUMENT_ROOT'].'uno-course-scheduler/include/config.inc.php');
	require_once($_SERVER['DOCUMENT_ROOT'].'uno-course-scheduler/include/top.inc.php');
?>



<?php
//get num_rows currently in instructors table
$availability_id = mysql_real_escape_string(strip_tags($_GET['id']));
$q = "SELECT *, i.id AS instructor_id
	  FROM instructor_availability ia
	  JOIN instructors i ON i.id = ia.instructor_id
	  JOIN days d ON d.id = ia.day_id";
$r = mysql_query($q);
$row = mysql_fetch_assoc($r);
$instructor_id = $row['instructor_id'];
$instructor_fname = $row['first_name'];
$instructor_lname = $row['last_name'];
$day_of_week = $row['day_name'];
$starttime = $row['start_time'];
$endtime = $row['end_time'];



echo "<p>";
	echo "<a href='update_availability.php?id=$instructor_id'>&lt;&lt; Back to Instructor Availability</a><br />";
echo "</p>";
echo "<h1>Delete Availability for $instructor_fname $instructor_lname</h1>";

echo "<p>Are you sure you want to delete this timeslot:</p>";
echo "<p><strong>$day_of_week, ".date('g:ia', strtotime($starttime))." to ".date('g:ia', strtotime($endtime))."</strong></p>";

echo '<form action="delete_timeslots_do.php" method="post">';
echo "<input type='hidden' name='iid' value='$instructor_id'>";
echo "<input type='hidden' name='id' value='$availability_id'>";
echo '<p><input type="submit" value="Yes"></p>';
echo '</form>';


?>

<p>
	
</p>

<?php
	require_once($_SERVER['DOCUMENT_ROOT'].'uno-course-scheduler/include/bottom.inc.php');
?>